
<%@ page import="your_car_status.Vehicle" %>
<!DOCTYPE html>
<html>
  <head>
    <meta name="layout" content="main">
  <g:set var="entityName" value="${message(code: 'vehicle.label', default: 'Vehicle')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <a href="#list-vehicle" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
  <div class="nav" role="navigation">
    <ul>
      <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
      <li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
      <li><g:link class="list" action="logout" controller="LogIn">Cerrar sesion</g:link></li>
    </ul>
  </div>
  <div id="list-vehicle" class="content scaffold-list" role="main">
    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message" role="status">${flash.message}</div>
    </g:if>
    <table>
      <thead>
        <tr>

      <g:sortableColumn property="licensePlate" title="${message(code: 'vehicle.licensePlate.label', default: 'License Plate')}" />

      <g:sortableColumn property="serialNumber" title="${message(code: 'vehicle.serialNumber.label', default: 'Serial Number')}" />

      <g:sortableColumn property="policyNumber" title="${message(code: 'vehicle.policyNumber.label', default: 'Policy Number')}" />

      <g:sortableColumn property="mileage" title="${message(code: 'vehicle.mileage.label', default: 'Mileage')}" />

      <g:sortableColumn property="fuelType" title="${message(code: 'vehicle.fuelType.label', default: 'Fuel Type')}" />

      <g:sortableColumn property="carMake" title="${message(code: 'vehicle.carMake.label', default: 'Car Make')}" />

      </tr>
      </thead>
      <tbody>
      <g:each in="${vehicleInstanceList}" status="i" var="vehicleInstance">
        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

          <td><g:link action="show" id="${vehicleInstance.id}">${fieldValue(bean: vehicleInstance, field: "licensePlate")}</g:link></td>

        <td>${fieldValue(bean: vehicleInstance, field: "serialNumber")}</td>

        <td>${fieldValue(bean: vehicleInstance, field: "policyNumber")}</td>

        <td>${fieldValue(bean: vehicleInstance, field: "mileage")}</td>

        <td>${fieldValue(bean: vehicleInstance, field: "fuelType")}</td>

        <td>${fieldValue(bean: vehicleInstance, field: "carMake")}</td>

        </tr>
      </g:each>
      </tbody>
    </table>
    <div class="pagination">
      <g:paginate total="${vehicleInstanceTotal}" />
    </div>
  </div>
</body>
</html>
